<?php
    session_start();
    if(! isset($_SESSION['username'])) {
        header('Location:index.html');
    }

    ?>

<?php 
include('conn.php');
$search='';
$key=isset($_GET['key'])?$_GET['key']:'';
if($key!=''){
	$search.= " where nicheng like '%".$key."%'";
}

    $sql = "select * from user".$search." order by id asc";
	$result = mysqli_query($conn,$sql);
	$rows = @mysqli_num_rows($result);	

	

?>





<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
     <link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./font/iconfont.css">
<script src="./font/iconfont.js"></script>
    <style>
.icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
            font-size: 14px;
            margin-right:5px;
}
        .div{
            position: relative;
            text-align: center;
            padding-left: 500px;
        }
        .font{
            font-size: 16px;
            font-weight: bold;;
        }
        form{
            font-weight:bold;
            position: relative;
        }
.sousuok {
 height:60px;
        width:300px; 
       
     



}
.sousuo {
        background: url(./images/sous.png);
        width: 51px;
        height: 51px;
        border-style: none;
 position: absolute;
       top: -20px;
 left: 270px;

      

    }
#zcl {
text-align: center;
background-color:#bfd0fa
}
th {

line-height: 45px;
}
img{
border: 1px solid #7492f6;
}
 #fh{
        font-size: 24px;
        float: right;
       line-height: 50px;
        color: darkgray;
    }
#fhw{
font-size: 16px;
line-height: 54px;
}



    </style>
</head>
<body>
<div style="text-align: center">
<?php
include ("menu.php");
?>

		<br>
			<? if($_SESSION['img']==''){?>  
			<a href="https://jq.qq.com/?_wv=1027&k=qCPXle6A"><img src="img/logo.jpg" width="80" /></a> 
			<?}else{?>
			<a href="https://jq.qq.com/?_wv=1027&k=qCPXle6A"><img class="yuanxing" src="<?echo $_SESSION['img'];?>" width="80" style="border-radius: 50px; border: 1px solid #7492f6; width:100px;height:100px;margin: 5px 5px 5px 0;padding: 2px;
    position: absolute;
    border-radius: 50px;


" /></a>  
			<?}?>
		  <div class="btn_zhuce">
			  <form action="#" method="get" class="fl">
					 <input  class="sousuok"type="text"  name="key" placeholder="请输入游戏名中的一个或多个字" value="<?php echo $key ?>"/>
					   <input class="sousuo" value="" type="submit">
			  </form>	  
		  </div>
</br>
		  <table class="table table-bordered table-hover">
			  <tr>
         
       
 
      
 </tr>
			<?php
    //    1. 链接数据库
  
  
    foreach ( $conn->query($sql) as $row) {
        //2.执行sql  //3.data 解析
?>
<tr>


<th>
<? if($row['img']==''){?>
<img class="yuanxing" src="img/logo.jpg" width="80" style="border-radius: 5px; width:50px;height:50px;margin: 5px 5px 5px 0;
    position: absolute;
    border-radius: 5px;


" />
        <?}else{?>
<img class="yuanxing" src="<?=$row['img']?>" width="80" style="border-radius: 5px; width:50px;height:50px;margin: 5px 5px 5px 0;
    position: absolute;
    border-radius: 5px;


" />
<?}?>
&nbsp;<?=$row['nicheng']?>

<span id="fh">
<span id="fhw"><?php
 echo"
<a href='zil.php?id={$row['id']}'>更多</a>
";?></span>></span>



</th>




</tr>

        <? }?>
		  </table>

  </div>
 </body>
<script>

$('#fh').click(function(){
  $('#fhw').click();
  })
</script>
</html>
 

